/* 传入null不设置该属性 */

/* 弹性盒子 */
@mixin flexBox($direction: row, $justify: null, $align: null, $flex-wrap: null) {
  display: flex;
  @if ($direction != null) {
    flex-direction: $direction;
  }
  @if ($justify != null) {
    justify-content: $justify;
  }
  @if ($align != null) {
    align-items: $align;
  }
  @if ($flex-wrap != null) {
    flex-wrap: $flex-wrap;
  }
}

/* 绝对定位 */
@mixin positionAbsolute($top: null, $right: null, $bottom: null, $left: null) {
  position: absolute;
  @if ($left != '' and $left != null) {
    left: $left;
  }
  @if ($right != '' and $right != null) {
    right: $right;
  }
  @if ($top != '' and $top != null) {
    top: $top;
  }
  @if ($bottom != '' and $bottom != null) {
    bottom: $bottom;
  }
}

/* 文本超出样式 */
@mixin textOverflow($width: 100%, $display: block) {
  display: $display;
  width: $width;
  overflow: hidden;
  -ms-text-overflow: ellipsis;
  text-overflow: ellipsis;
  white-space: nowrap;
}
